
import Relay from "react-relay";
export default class SaveSewRaw extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { saveSewRaw }`;
    }

    getVariables() { 
        return {
            argsInput: {
                pdId:this.props.pdId,
                finishDate: this.props.finishDate,
                deleteSewRawIds: this.props.deleteSewRawIds,
                uid:this.props.uid,
                sewRawList: this.props.sewRawList,
            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on saveSewRawPayload {
            saveSewRaw {
                errorCode
                value
                totalResult
                id
                sewRawList{
                    quantity
                    imgRealName
                    sewRawId
                    prickle
                    sampleImg
                    pdId
                    position
                    name
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
               fragment on saveSewRawPayload  {
                    saveSewRaw {
                        errorCode
                        value
                        totalResult
                        id
                        sewRawList{
                            quantity
                            imgRealName
                            sewRawId
                            prickle
                            sampleImg
                            pdId
                            position
                            name
                        }
                    }
                 }
            `]
        }];
    }

}
